const { Modal, Tabs, Button } = antd;
const { useState } = React;

export default function TestModal({ title, trigger, content,width }) {
  const [visible, setVisible] = useState(false);

  return (
    <>
      {React.cloneElement(trigger, { onClick: ()=>setVisible(true) })}
      <Modal
        width={width}
        title={title}
        visible={visible}
        onCancel={() => setVisible(false)}
        footer={null}
      >
          {content}
      </Modal>
    </>
  );
};

